import request from '@/utils/request'

// 合作企业分页
export function pagingCooperationUnit(dataRequest) {
	return request({
		url: '/admin/config/company/paging',
		method: 'POST',
		data: dataRequest
	})
}

// 新增合作企业
export function addCooperationUnit(dataRequest) {
	return request({
		url: '/admin/config/company',
		method: 'POST',
		data: dataRequest
	})
}

// 修改合作企业
export function editCooperationUnit(dataRequest) {
	return request({
		url: '/admin/config/company',
		method: 'PUT',
		data: dataRequest
	})
}

// 上下架合作企业
export function publishCooperationUnit(dataRequest) {
	return request({
		url: '/admin/config/company/publish',
		method: 'PUT',
		data: dataRequest
	})
}
// 合作企业详情
export function getCooperationUnitDetail(id) {
	return request({
		url: '/admin/config/company/' + id,
		method: 'GET',
	})
}

// 删除合作企业
export function delCooperationUnit(idList) {
	return request({
		url: '/admin/config/company/' + idList,
		method: 'DELETE',
	})
}
